com.highdeal.pnr.hci
Class CurrencyModel

java.lang.Object
  extended by com.highdeal.pnr.hci.CurrencyModel
All Implemented Interfaces:
XMLMarshallable

public class CurrencyModel
extends java.lang.Object
implements XMLMarshallable

This class represents a currency defined in SAP CC, made up with the following attributes:. - code: The currency unique code.
- precision: The currency precision.
- name: The currency name.
- ISOCode: The code of the associated ISO 4217 currency.

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="currency">
  <xs:complexType>
    <xs:attribute name="code" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
            <xs:maxLength value="5"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="precision" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:integer">
           <xs:minInclusive value="0"/>
           <xs:maxInclusive value="999"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="name" use="optional" >
      <xs:simpleType>
        <xs:restriction base="xs:string">
            <xs:maxLength value="40"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="ISOCode" use="optional" >
      <xs:simpleType>
        <xs:restriction base="xs:string">
            <xs:maxLength value="3"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
 </xs:element>


Field Summary
static java.lang.String MODEL_NAME
           
 
Constructor Summary
CurrencyModel()
           
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 java.lang.String getCode()
          Gets this currency code.
 java.lang.String getISOCode()
          Gets this currency ISO 4217 code.
 java.lang.String getName()
          Gets this currency name.
 int getPrecision()
          Gets this currency precision.
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, including its children.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 void setCode(java.lang.String code)
          Sets code to this currency.
 void setISOCode(java.lang.String ISOCode)
          Sets ISO 4217 code to this currency.
 void setName(java.lang.String name)
          Sets name to this currency.
 void setPrecision(int precision)
          Sets precision to this currency.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODEL_NAME

public static final java.lang.String MODEL_NAME
See Also:
Constant Field Values
Constructor Detail

CurrencyModel

public CurrencyModel()
Method Detail

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Specified by:
addCharacterData in interface XMLMarshallable
Parameters:
cData - The character data to be added

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the object, the child representing the marshallable object which must be added to the element.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - The name of tag for the child
child - The child to be added

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, including its children.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - The XML output to marshal the object into

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the element being processed.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - The XML attributes of the current element

getCode

public java.lang.String getCode()
Gets this currency code.

Returns:
the code of the currency.

setCode

public void setCode(java.lang.String code)
Sets code to this currency.

Parameters:
code - the code of the currency.

getPrecision

public int getPrecision()
Gets this currency precision.

Returns:
the precision of the currency.

setPrecision

public void setPrecision(int precision)
Sets precision to this currency.

Parameters:
precision - the precision of the currency.

getName

public java.lang.String getName()
Gets this currency name.

Returns:
the name of the currency.

setName

public void setName(java.lang.String name)
Sets name to this currency.

Parameters:
name - the name of the currency.

getISOCode

public java.lang.String getISOCode()
Gets this currency ISO 4217 code.

Returns:
the ISO 4217 code of the currency.

setISOCode

public void setISOCode(java.lang.String ISOCode)
Sets ISO 4217 code to this currency.

Parameters:
ISOCode - the ISO 4217 code of the currency.

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)